package StudyCode.summary.mycollection;

import java.util.SortedMap;
import java.util.TreeMap;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class GetHeadMapFromTreeMap {
	public static void main(String[] args) {
		TreeMap treeMap = new TreeMap();
		treeMap.put("1", "One");
		treeMap.put("3", "Three");
		treeMap.put("2", "Two");
		treeMap.put("5", "Five");
		treeMap.put("4", "Four");
		SortedMap sortedMap = treeMap.headMap("3");
		System.out.println("从 TreeMap 获取的 Head Map 包含 : " + sortedMap);
	}
}
